if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PreservationNoticeHistoryUpdateTries]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[PreservationNoticeHistoryUpdateTries]
GO

CREATE PROCEDURE dbo.[PreservationNoticeHistoryUpdateTries]
(
	@PreservationNoticeHistoryID int
)
AS
SET NOCOUNT ON

DECLARE @tries int

SELECT 
	@tries = VerificationTries 
FROM 
	PreservationNoticeHistory 
WHERE 
	PreservationNoticeHistoryID = @PreservationNoticeHistoryID

SET @tries = @tries + 1

UPDATE 
	PreservationNoticeHistory
SET    
	VerificationTries = @tries
WHERE  
	PreservationNoticeHistoryID = @PreservationNoticeHistoryID
GO
